<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
    <div class=" timo-compile">
    <form th:action="@{/SpringBoot/device/save}">
        <input type="hidden" name="id" th:if="${device}" th:value="${device.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">设备名</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="name" placeholder="请输入设备名" th:value="${device?.name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">设备位置</label>
            <!--<div class="layui-input-inline">
                <input class="layui-input" type="text" name="lab_id" placeholder="请输入设备位置" th:value="${device?.lab_id}">
            </div>-->
            <select name="lab_id" style="width: 240px;height: 38px">
                <option th:label="请选择实验室"></option>c
                <!--<option th:if="${labs.indexOf(lab) == 0}">选择实验室</option>-->
                <option  th:each="lab:${labs}" th:value="${lab.getId()}" th:label="${lab.getName()}"></option>

            </select>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
</body>
</html>